package com.gzx.plugin.tjzy.modular.phone.filter.mapper;

import com.gzx.plugin.tjzy.modular.phone.filter.entity.GzxPhoneFilter;
import com.gzx.plugin.tjzy.modular.phone.filter.entity.vo.GzxPhoneFilterVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import vip.xiaonuo.common.mapper.BaseMapperPlus;

import java.util.List;

/**
 * @author zjt
 * @description
 * @since 2025/3/4 11:56
 */
public interface GzxPhoneFilterMapper extends BaseMapperPlus<GzxPhoneFilter, GzxPhoneFilterVo> {

    /**
     * 批量新增过滤的手机号
     *
     * @param filterPhones
     */
    @Insert("<script>" +
            "INSERT INTO gzx_phone_filter (phone_number, id_card, name, remark, project_code) " +
            "VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "(#{item.phoneNumber}, #{item.idCard}, #{item.name}, #{item.remark}, #{projectCode})" +
            "</foreach>" +
            "</script>")
    void insertBatchFilterPhone(@Param("projectCode") String projectCode, @Param("list") List<GzxPhoneFilter> filterPhones);
}
